package design.ChainOfResponsibility;

/**
 * Created by looper on 2017/8/21.
 */
public class ConcreteHandler extends AbstractHandler implements Handler {
  private String name;

  public ConcreteHandler(String name){
    this.name = name;
  }

  @Override
  public void operator() {
    if(getHandler() != null){
      System.out.println(name+"略过该请求  请求被送到下一接收者");
      getHandler().operator();
    }else{
      System.out.println("该请求已被处理");
    }
  }
}
